package gameAppLayer.stateMachine.strategyState.mapElements;

import gameAppLayer.enums.Constants;
import tiles.HexMeshBuilder2;

import com.jme3.asset.AssetManager;
import com.jme3.material.Material;
import com.jme3.material.RenderState.BlendMode;
import com.jme3.math.ColorRGBA;
import com.jme3.renderer.queue.RenderQueue.Bucket;
import com.jme3.scene.Geometry;
import com.jme3.scene.Mesh;
import com.jme3.scene.Spatial;

public class SystemTileViewBuilder {
	
	public Spatial createView(AssetManager assetManager) {
		HexMeshBuilder2 hexBuild = new HexMeshBuilder2();
		Mesh mesh = hexBuild.buildMesh();
		
		Geometry geometry = new Geometry("test", mesh);
		
		Material mat = new Material(assetManager, Constants.unshadedMaterial);
		mat.setColor("Color", new ColorRGBA(0,0,0,0.0f));
		//mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
		geometry.setMaterial(mat);
		geometry.setQueueBucket(Bucket.Transparent);
		
		return geometry;
	}
	
//	public void changeView(AssetManager assetManager, Geometry geometry, String state) {
//		if (state.equalsIgnoreCase("Default")) {
//			HexMeshBuilder2 hexBuild = new HexMeshBuilder2();
//			Mesh mesh = hexBuild.buildMesh();
//			
//			geometry.setMesh(mesh);
//			Material mat = new Material(assetManager, Constants.unshadedMaterial);
//			mat.setColor("Color", new ColorRGBA(0,0,0,0.0f));
//			//mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
//			geometry.setMaterial(mat);
//			geometry.setQueueBucket(Bucket.Transparent);
//		}
//		else if (state.equalsIgnoreCase("Highlighted")) {
//			
//		}
//		
//		//return geometry;
//		
//		
//	}

}
